package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CoachClassMapper;
import com.ruoyi.system.domain.CoachClass;
import com.ruoyi.system.service.ICoachClassService;

/**
 * 私教课程列表Service业务层处理
 * 
 * @author yuanML2018
 * @date 2025-01-04
 */
@Service
public class CoachClassServiceImpl implements ICoachClassService 
{
    @Autowired
    private CoachClassMapper coachClassMapper;

    /**
     * 查询私教课程列表
     * 
     * @param id 私教课程列表主键
     * @return 私教课程列表
     */
    @Override
    public CoachClass selectCoachClassById(Long id)
    {
        return coachClassMapper.selectCoachClassById(id);
    }

    /**
     * 查询私教课程列表列表
     * 
     * @param coachClass 私教课程列表
     * @return 私教课程列表
     */
    @Override
    public List<CoachClass> selectCoachClassList(CoachClass coachClass)
    {
        return coachClassMapper.selectCoachClassList(coachClass);
    }

    /**
     * 新增私教课程列表
     * 
     * @param coachClass 私教课程列表
     * @return 结果
     */
    @Override
    public int insertCoachClass(CoachClass coachClass)
    {
        coachClass.setCreateTime(DateUtils.getNowDate());
        return coachClassMapper.insertCoachClass(coachClass);
    }

    /**
     * 修改私教课程列表
     * 
     * @param coachClass 私教课程列表
     * @return 结果
     */
    @Override
    public int updateCoachClass(CoachClass coachClass)
    {
        coachClass.setUpdateTime(DateUtils.getNowDate());
        return coachClassMapper.updateCoachClass(coachClass);
    }

    /**
     * 批量删除私教课程列表
     * 
     * @param ids 需要删除的私教课程列表主键
     * @return 结果
     */
    @Override
    public int deleteCoachClassByIds(Long[] ids)
    {
        return coachClassMapper.deleteCoachClassByIds(ids);
    }

    /**
     * 删除私教课程列表信息
     * 
     * @param id 私教课程列表主键
     * @return 结果
     */
    @Override
    public int deleteCoachClassById(Long id)
    {
        return coachClassMapper.deleteCoachClassById(id);
    }
}
